import { createApp ,reactive} from 'vue';
import './style.css';
import './assets/css/iconfont.css'
import App from './App.vue';
import router from './router/router'; // 导入 router
// 导入 Element Plus 及其样式
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'; // 使用新的导入路径
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//定义全局方法
import { isHttp } from "@/utils/index.js";
// 获取Vue实例的全局属性中的语言相关对象
//定义全局变量
const globalLanguage = reactive({
  languageSuffix: 'Cn'
});  //reactive 定义响应式


const configs = reactive({
  addressCn: '广州市白云区松洲街高桥路三街25号103室',
  addressRa: 'No. 25, Third Street, Gaoqiao Road, Songzhou Street, Baiyun District, Guangzhou City',
  phone: 13600008684,
  nameCn: '广州风速达货运代理有限公司',
  nameRa: 'FengSuDa-компания',
  web: 'www.fsdgz.cn',
  email: 'blackjack2831@126.com',
});



const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


app.config.globalProperties.globalLanguage = globalLanguage;
app.config.globalProperties.configs = configs
// 将isHttp函数挂载到Vue实例的全局属性上
app.config.globalProperties.isHttp = isHttp

// 使用 Element Plus
app.use(ElementPlus);
app.use(router); // 使用路由
app.mount('#app'); // 挂载应用
